<template>
    <div id="searchmovie">
      <ul>
        <li v-for="s in movielist" :key="s.id">
            <hr>
            <div id="scroll">
                <div class="head-left">
                    <!-- 海报 -->
                    <van-row gutter="10" >
                        <van-col span="6"><img :src="s.img"></van-col>
                        <van-col span="14">
                            <h3>{{s.nm}}</h3>
                            <span>{{s.enm}}</span>
                            <span class="spantext">{{s.cat}}</span><br>
                            <span>{{s.rt}}</span>
                        </van-col>
                        <van-col span="4">
                            <h3 class="h-active">{{s.sc}}分</h3>
                            <van-button type="primary" class="van-button" color="red" text="想看"></van-button>
                        </van-col>
                    </van-row>
            </div>
            </div>
        </li>
    </ul>
  </div>
</template>

<script>
export default {
    name:'searchmovielist',
    mounted(){
        this.$bus.$on('movielist',this.getList)
    },
    data(){
        return {
            movielist:[],
        }
    },
    methods:{
        getList(data){
            this.movielist=data
        }
    }
}
</script>

<style scoped>
*{
    padding: 0;
    margin: 0;
}
#scroll {
    width: 100%;
    height: 100%;
    overflow: auto;
}
#searchmovie img{
    width: 100%;
    height: 100px;
}
#searchmovie .head-left{
    margin: 15px 0;
    padding: 0 15px;
}
#searchmovie .spantext{
    display: inline-block;
    width: 40vw;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
#searchmovie .h-active{
    color: orange;
    font-weight: 700;
    font-size: 22px;
}
#searchmovie .van-button{
    width: 60px;
    height: 30px;
    line-height: 30px;
    border-radius:5px;
}
</style>